package com.idealighter.game.games.orderma.struct;

import static com.idealighter.game.games.orderma.struct.OderMaMjType.TIAO;
import static com.idealighter.game.games.orderma.struct.OderMaMjType.TONG;
import static com.idealighter.game.games.orderma.struct.OderMaMjType.WAN;

/**
 * 四川麻将(万、筒、条)共108张 .
 * 
 * @date 2016年8月22日 下午5:43:20
 *
 */
public enum OderMaMj {

  /*
   * 万 .
   */
  YI_WAN(1, 1, WAN), ER_WAN(2, 2, WAN), SAN_WAN(3, 3, WAN), SI_WAN(4, 4, WAN), WU_WAN(5, 5,
      WAN), LIU_WAN(6, 6, WAN), QI_WAN(7, 7, WAN), BA_WAN(8, 8, WAN), JIU_WAN(9, 9, WAN),

  /*
   * 筒 .
   */
  YI_TONG(10, 1, TONG), ER_TONG(11, 2, TONG), SAN_TONG(12, 3, TONG), SI_TONG(13, 4, TONG), WU_TONG(
      14, 5, TONG), LIU_TONG(15, 6,
          TONG), QI_TONG(16, 7, TONG), BA_TONG(17, 8, TONG), JIU_TONG(18, 9, TONG),

  /*
   * 条 .
   */
  YI_TIAO(19, 1, TIAO), ER_TIAO(20, 2, TIAO), SAN_TIAO(21, 3, TIAO), SI_TIAO(22, 4, TIAO), WU_TIAO(
      23, 5, TIAO), LIU_TIAO(24, 6,
          TIAO), QI_TIAO(25, 7, TIAO), BA_TIAO(26, 8, TIAO), JIU_TIAO(27, 9, TIAO),;

  // id
  public int id;
  // 数字
  public int num;
  // 类型
  public OderMaMjType type;

  private OderMaMj(int id, int num, OderMaMjType type) {
    this.id = id;
    this.num = num;
    this.type = type;
  }

  public static OderMaMj getMj(int mjId) {

    return values()[mjId - 1];
  }
}
